package com.mychat.service;


import com.mychat.entity.dto.TokenUserInfoDto;
import com.mychat.entity.dto.UserContactSearchResultDto;
import com.mychat.entity.vo.PaginationResultVO;
import com.mychat.entity.po.UserContact;
import com.mychat.entity.query.UserContactQuery;
import com.mychat.enums.UserContactStatusEnum;
import com.mychat.exception.BusinessException;

import java.util.List;
/**
 * @Description:Service
 * @auther:YYT
 * @date:2025/03/02
 */
public interface UserContactService {

	/**
	 * 根据条件查询列表
	 */
	List<UserContact> findListByParam(UserContactQuery query);

	/**
	 * 根据条件查询数量
	 */
	Integer findCountByParam(UserContactQuery query);

	/**
	 * 分页查询
	 */
	PaginationResultVO<UserContact> findListByPage(UserContactQuery query);

	/**
	 * 新增
	 */
	Integer add(UserContact bean);

	/**
	 * 批量新增
	 */
	Integer addBatch(List<UserContact> listBean);

	/**
	 * 批量新增或修改
	 */
	Integer addOrUpdateBatch(List<UserContact> listBean);

	/**
	 * 根据UserIdAndContactId查询
	 */
	UserContact getUserContactByUserIdAndContactId(String userId, String contactId);

	/**
	 * 根据UserIdAndContactId更新
	 */
	Integer updateUserContactByUserIdAndContactId(UserContact bean, String userId, String contactId);

	/**
	 * 根据UserIdAndContactId删除
	 */
	Integer deleteUserContactByUserIdAndContactId(String userId, String contactId);


    UserContactSearchResultDto searchContact(String userId, String contactId);

	List<UserContact> findGroupListByParam(UserContactQuery query);

	void removeUserContact(String userId, String contactId, UserContactStatusEnum userContactStatusEnum);

	void addContact(String applyUserId, String receiveUserId, String contactId, Integer contactType, String applyInfo) throws BusinessException;

    void addContact4Robot(String userId);
}